home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form1
- Caption = "Form1"
- ClientHeight = 4335
- ClientLeft = 990
- ClientTop = 1620
- ClientWidth = 6765
- Height = 4740
- Left = 930
- LinkMode = 1 'Source
- LinkTopic = "Form1"
- ScaleHeight = 4335
- ScaleWidth = 6765
- Top = 1275
- Width = 6885
- Begin CommandButton ButtonExit
- Caption = "Exit"
- Height = 372
- Left = 2280
- TabIndex = 5
- Top = 3600
- Width = 1932
- End
- Begin CommandButton TaggedCtl
- Caption = "Show All Tags"
- Height = 372
- Left = 3360
- TabIndex = 6
- Top = 2880
- Width = 1932
- End
- Begin CommandButton ButtonSet
- Caption = "Set"
- Height = 372
- Left = 3480
- TabIndex = 9
- Top = 1920
- Width = 732
- End
- Begin CommandButton ButtonGet
- Caption = "Get"
- Height = 372
- Left = 2280
- TabIndex = 8
- Top = 1920
- Width = 852
- End
- Begin TextBox ValueIn
- Height = 372
- Left = 3120
- TabIndex = 3
- Top = 1320
- Width = 3012
- End
- Begin TextBox KeyIn
- Height = 372
- Left = 840
- TabIndex = 1
- Top = 1320
- Width = 1932
- End
- Begin Label Label2
- Caption = "Tagged Control"
- Height = 372
- Left = 1440
- TabIndex = 7
- Top = 2880
- Width = 1692
- End
- Begin Label Label3
- Caption = "Value"
- Height = 252
- Left = 3120
- TabIndex = 4
- Top = 960
- Width = 1812
- End
- Begin Label Label6
- Caption = "Enter key"
- Height = 252
- Left = 960
- TabIndex = 2
- Top = 960
- Width = 1812
- End
- Begin Label Label1
- Alignment = 2 'Center
- Caption = "Test Of Tag Environment Subsystem"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 12
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 492
- Left = 960
- TabIndex = 0
- Top = 240
- Width = 5052
- End
- Sub ButtonExit_Click ()
- End
- End Sub
- Sub ButtonGet_Click ()
- Dim theKey As String
- Dim theValue As String
- theKey = LTrim$(RTrim$(KeyIn.Text))
- If theKey <> "" Then
- ValueIn.Text = ""
- GetCtlTagString TaggedCtl, theKey, theValue
- ValueIn.Text = theValue
- Else
- Beep
- End If
- End Sub
- Sub ButtonSet_Click ()
- Dim theKey As String
- Dim theValue As String
- theKey = LTrim$(RTrim$(KeyIn.Text))
- If theKey <> "" Then
- theValue = LTrim$(RTrim$(ValueIn.Text))
- SetCtlTagString TaggedCtl, theKey, theValue
- Else
- Beep
- End If
- End Sub
- Sub Form_Load ()
- Dim theKey As String
- Dim theValue As String
- SetFormTagString Form1, "FormName", "Form1"
- SetFormTagString Form1, "MyName", "Tom Dacon"
- SetFormTagString Form1, "My Full Name", "Thomas A. Dacon"
- SetFormTagString Form1, "WithQuotes", """with enclosing quotes"""
- Debug.Print Form1.Tag
- theKey = "formname"
- GoSub GetAndPrint
- theKey = "myname"
- GoSub GetAndPrint
- theKey = "my full name"
- GoSub GetAndPrint
- theKey = "WITHQUOTES"
- GoSub GetAndPrint
- Exit Sub
- GetAndPrint:
- GetFormTagString Form1, theKey, theValue
- Debug.Print "["; theKey; "]"; " ";
- Debug.Print "["; theValue; "]"
- Return
- End Sub
- Sub TaggedCtl_Click ()
- Debug.Print TaggedCtl.Tag
- End Sub
- Sub ValueIn_KeyPress (KeyAscii As Integer)
- ' User entered something in the value field.
- Dim theKey As String
- Dim theValue As String
- If KeyAscii = 13 Then 'Enter key
- theKey = LTrim$(RTrim$(KeyIn.Text))
- If theKey <> "" Then
- theValue = LTrim$(RTrim$(ValueIn.Text))
- SetCtlTagString TaggedCtl, theKey, theValue
- GetCtlTagString TaggedCtl, theKey, theValue
- ValueIn.Text = theValue
- Else
- Beep
- End If
- End If
- End Sub
-